1300
Is it possible to cancel or discard the values during validation
PROCEDURE OnValidateValue(oG2antt,Item,ColIndex,NewValue,Cancel)
	DevOut( "ValidateValue" )
	DevOut( Transform(NewValue,"") )
	DevOut( "Change the Cancel parameter for ValidateValue event to accept/decline the newly value. " )
	DevOut( "The DiscardValidateValue restores back the previously values." )
	oG2antt:DiscardValidateValue()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:ValidateValue := {|Item,ColIndex,NewValue,Cancel| OnValidateValue(oG2antt,Item,ColIndex,NewValue,Cancel)} /*Occurs before user changes the cell's value.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:CauseValidateValue := -1/*exValidateCell*/
		oG2antt:Columns():Add("Date"):Editor():EditType := 7/*DateType*/
		oG2antt:Columns():Add("Text"):Editor():EditType := 1/*EditType*/
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("01/01/2001"),1,"text")
			oItems:SetProperty("CellValue",oItems:AddItem("01/01/2001"),1,"text")
			oItems:SetProperty("CellValue",oItems:AddItem("01/01/2001"),1,"text")
			oItems:SetProperty("CellValue",oItems:AddItem("01/01/2001"),1,"text")
			oItems:SetProperty("CellValue",oItems:AddItem("01/01/2001"),1,"text")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1299
Is it possible to validate the values of the cells only when user leaves the focused item
PROCEDURE OnValidateValue(oG2antt,Item,ColIndex,NewValue,Cancel)
	DevOut( "ValidateValue" )
	DevOut( Transform(NewValue,"") )
	DevOut( "Change the Cancel parameter for ValidateValue event to accept/decline the newly value. " )
	Cancel := .T.
	DevOut( "You can not leave the item/record until the Cancel is False." )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:ValidateValue := {|Item,ColIndex,NewValue,Cancel| OnValidateValue(oG2antt,Item,ColIndex,NewValue,Cancel)} /*Occurs before user changes the cell's value.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:CauseValidateValue := 1/*exValidateItem*/
		oG2antt:Columns():Add("Date"):Editor():EditType := 7/*DateType*/
		oG2antt:Columns():Add("Text"):Editor():EditType := 1/*EditType*/
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("01/01/2001"),1,"text")
			oItems:SetProperty("CellValue",oItems:AddItem("01/01/2001"),1,"text")
			oItems:SetProperty("CellValue",oItems:AddItem("01/01/2001"),1,"text")
			oItems:SetProperty("CellValue",oItems:AddItem("01/01/2001"),1,"text")
			oItems:SetProperty("CellValue",oItems:AddItem("01/01/2001"),1,"text")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1298
We would like to validate the values of the cells. Is it possible
PROCEDURE OnValidateValue(oG2antt,Item,ColIndex,NewValue,Cancel)
	DevOut( "ValidateValue" )
	DevOut( Transform(NewValue,"") )
	DevOut( "Change the Cancel parameter for ValidateValue event to accept/decline the newly value." )
	Cancel := .T.
	DevOut( "You can not leave the cell until the Cancel is False." )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:ValidateValue := {|Item,ColIndex,NewValue,Cancel| OnValidateValue(oG2antt,Item,ColIndex,NewValue,Cancel)} /*Occurs before user changes the cell's value.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:CauseValidateValue := -1/*exValidateCell*/
		oG2antt:Columns():Add("Date"):Editor():EditType := 7/*DateType*/
		oG2antt:Columns():Add("Text"):Editor():EditType := 1/*EditType*/
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("01/01/2001"),1,"text")
			oItems:SetProperty("CellValue",oItems:AddItem("01/01/2001"),1,"text")
			oItems:SetProperty("CellValue",oItems:AddItem("01/01/2001"),1,"text")
			oItems:SetProperty("CellValue",oItems:AddItem("01/01/2001"),1,"text")
			oItems:SetProperty("CellValue",oItems:AddItem("01/01/2001"),1,"text")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1297
Is there any way to add auto-numbering
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oColumns := oG2antt:Columns()
			oColumns:Add("Items")
			oColumn := oColumns:Add("Pos")
				oColumn:FormatColumn := "1 pos ''"
				oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1296
How can I format my column to display the percent values “5,00%”
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Percent"):FormatColumn := "((dbl(value) * 100) format '2|,|3.')+'%'"
		oItems := oG2antt:Items()
			oItems:AddItem(0.5)
			oItems:AddItem(0.4)
			oItems:AddItem(0.75)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1295
I can't control bar's transparency if the bar is overlaid. What can be done

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:ScrollBySingleLine := .T.
		oG2antt:Columns():Add("Task")
		oG2antt:DrawGridLines := 1/*exHLines*/
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := 1/*exHLines*/
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:AllowLinkBars := .F.
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
				oBar:SetProperty("Overlaid",256/*exOverlaidBarsTransparent*/,0)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1")
			oItems:SetProperty("ItemBar",h,"A1",19/*exBarTransparent*/,80)
			oItems:AddBar(h,"Task","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h,"Task","01/04/2001","01/07/2001","A3")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/07/2001","01/10/2001","A1")
			oItems:AddBar(h,"Task","01/08/2001","01/12/2001","A3")
			oItems:SetProperty("ItemBar",h,"A3",19/*exBarTransparent*/,50)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1294
How can I show the child items with no identation

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:LinesAtRoot := 5/*exGroupLinesOutside*/
		oG2antt:Indent := 12
		oG2antt:HasLines := 2/*exThinLine*/
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1293
Is there other ways of showing the hierarchy lines (exGroupLinesAtRoot)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:LinesAtRoot := 1/*exGroupLinesAtRoot*/
		oG2antt:Indent := 12
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1292
Is there other ways of showing the hierarchy lines (exGroupLinesOutside)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:LinesAtRoot := 5/*exGroupLinesOutside*/
		oG2antt:Indent := 12
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1291
Is there other ways of showing the hierarchy lines (exGroupLinesInsideLeaf)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:LinesAtRoot := 4/*exGroupLinesInsideLeaf*/
		oG2antt:Indent := 12
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1290
Is there other ways of showing the hierarchy lines (exGroupLinesInside)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:LinesAtRoot := 3/*exGroupLinesInside*/
		oG2antt:Indent := 12
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1289
Is there other ways of showing the hierarchy lines (exGroupLines)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:LinesAtRoot := 2/*exGroupLines*/
		oG2antt:Indent := 12
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(oItems:InsertItem(h,,"Child 2"),,"SubChild 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1288
How can I specify non-working dates for any year, as a repetitive expression for instance

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:AdjustLevelsToBase := .T.
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstVisibleDate := "12/24/2010"
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:LevelCount := 2
			oChart:NonworkingDays := 0
			oChart:AddNonworkingDate("shortdateF(value) left 5 in ('01/01','01/06','04/25','05/01','06/02','08/15','11/01','12/08','12/25','12/26')")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1287
Is it possible to specify the Easter and a day after as being non-working
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:AdjustLevelsToBase := .T.
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstVisibleDate := "04/14/2011"
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:LevelCount := 2
			oChart:NonworkingDays := 0
			oChart:AddNonworkingDate("not(month(value) in (3,4,5)) ? 0 : ( floor(value)=(2:=floor(date(dateS('3/1/' + year(value)) + ((1:=(((255 - 11 * (year(value) mod 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((year(value) + int(year(value) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7)))) or (floor(value)= =:2 + 1))")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1286
Here's a simple sample to compute the Easter day
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oEditor
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oEditor := oG2antt:Columns():Add("Year"):Editor()
			oEditor:EditType := 4/*SpinType*/
			oEditor:Numeric := -1/*exInteger*/
		oG2antt:Columns():Add("Easter"):ComputedField := "date(dateS('3/1/' + int(%0)) + ((1:=(((255 - 11 * (int(%0) mod 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((int(%0) + int(int(%0) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))"
		oItems := oG2antt:Items()
			oItems:AddItem(2008)
			oItems:AddItem(2009)
			oItems:AddItem(2010)
			oItems:AddItem(2011)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1285
How do I specify the Easter or holydays as non-working
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:AdjustLevelsToBase := .T.
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstVisibleDate := "04/14/2011"
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:LevelCount := 2
			oChart:NonworkingDays := 0
			oChart:AddNonworkingDate("month(value) = 7")
			oChart:AddNonworkingDate("not(month(value) in (3,4)) ? 0 : ( floor(value)=floor(date(dateS('3/1/' + year(value)) + ((1:=(((255 - 11 * (year(value) mod 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((year(value) + int(year(value) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))))")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1284
Is it possible to add a repetitive expression to define non-working dates
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstVisibleDate := "01/01/2010"
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:LevelCount := 2
			oChart:AddNonworkingDate("01/13/2010")
			oChart:AddNonworkingDate("month(value) = 1 and (day(value) in (1,6))")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1283
How do I get the Easter date
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Easter"):FormatColumn := "date(dateS('3/1/' + year(value))  + ((1:=(((255 - 11 * (year(value) mod 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((year(value) + int(year(value) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))"
		oItems := oG2antt:Items()
			oItems:AddItem("01/01/1989")
			oItems:AddItem("01/01/2001")
			oItems:AddItem("01/01/2002")
			oItems:AddItem("01/01/2003")
			oItems:AddItem("01/01/2010")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1282
How can I calculate the number of visible units
PROCEDURE OnClick(oG2antt)
	LOCAL oChart
	oChart := oG2antt:Chart()
		DevOut( "UnitCount:" )
		DevOut( Transform(oChart:CountVisibleUnits(oChart:DateFromPoint(0,-1),oChart:DateFromPoint(1,-1)),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Click := {|| OnClick(oG2antt)} /*Occurs when the user presses and then releases the left mouse button over the tree control.*/

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstVisibleDate := "01/01/2010"
			oChart:LevelCount := 2

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1281
Is it possible to specify the nonworking up to minutes and I can see when using the inside zoom feature

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oInsideZoomFormat
	LOCAL oItems
	LOCAL oLevel
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():Bars():Add("Task:Split"):Shortcut := "Task"
		oG2antt:DrawGridLines := 1/*exHLines*/
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 3
			oChart:UnitScale := 65536/*exHour*/
			oChart:UnitWidth := 16
			oChart:DrawLevelSeparator := 0/*exLevelNoLine*/
			oLevel := oChart:Level(2)
				oLevel:Unit := 1048576/*exMinute*/
				oLevel:Count := 60
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:ResizeUnitScale := 1048576/*exMinute*/
			oChart:ResizeUnitCount := 15
			oChart:AllowInsideZoom := .T.
			oInsideZoomFormat := oChart:DefaultInsideZoomFormat()
				oInsideZoomFormat:InsideUnit := 1048576/*exMinute*/
				oInsideZoomFormat:InsideCount := 15
				oInsideZoomFormat:InsideLabel := "<%nn%>"
				oInsideZoomFormat:OwnerLabel := "Hour: <b><%h%>"
				oInsideZoomFormat:DrawGridLines := .T.
			oChart:InsideZooms():Add("01/01/2010 12:00:00")
			oChart:InsideZooms():Add("01/01/2010 13:00:00")
			oChart:FirstVisibleDate := "01/01/2010 09:00:00"
		oG2antt:Columns():Add("Non-Working"):SetProperty("Def",16/*exCellSingleLine*/,.F.)
		oItems := oG2antt:Items()
			h := oItems:AddItem("12:30 to 14:00 Monday to Thursday, 12:30 to 13:30 on Friday")
			oItems:SetProperty("ItemNonworkingUnits",h,.F.,"weekday(value) case (default:((timeF(value)>=" + CHR(34) + "12:30:00" + CHR(34) + " and timeF(value) <=" + CHR(34) + "14:00:00" + CHR(34) + " ));5:( timeF(value)>=" + CHR(34) + "12:30:00" + CHR(34) + " and timeF(value) <=" + CHR(34) + "13:30:00" + CHR(34) + " );6:1;0:1) ")
			h := oItems:AddItem("10:45 to 13:45 Monday to Thursday, 10:45 to 14:30 on Friday")
			oItems:SetProperty("ItemNonworkingUnits",h,.F.,"weekday(value) case (default:((timeF(value)>=" + CHR(34) + "10:45:00" + CHR(34) + " and timeF(value) <=" + CHR(34) + "13:45:00" + CHR(34) + " ));5:( timeF(value)>=" + CHR(34) + "10:45:00" + CHR(34) + " and timeF(value) <=" + CHR(34) + "14:30:00" + CHR(34) + " );6:1;0:1) ")
			h := oItems:AddItem("2:30 to 9:30 on Friday, Saturday and Sunday")
			oItems:SetProperty("ItemNonworkingUnits",h,.F.,"weekday(value) case (default:((timeF(value)>=" + CHR(34) + "02:30:00" + CHR(34) + " and timeF(value) <=" + CHR(34) + "09:30:00" + CHR(34) + " ));1:0;2:0;3:0;4:0) ")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1280
Is it possible to show the non-working units up to minutes

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL oLevel
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():Bars():Add("Task:Split"):Shortcut := "Task"
		oG2antt:DrawGridLines := 1/*exHLines*/
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := 1/*exHLines*/
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:FirstVisibleDate := "01/01/2010"
			oChart:LevelCount := 2
			oChart:UnitScale := 65536/*exHour*/
			oChart:UnitWidth := 16
			oChart:DrawLevelSeparator := 0/*exLevelNoLine*/
			oLevel := oChart:Level(1)
				oLevel:Unit := 1048576/*exMinute*/
				oLevel:Count := 60
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:ResizeUnitScale := 1048576/*exMinute*/
			oChart:ResizeUnitCount := 15
		oG2antt:Columns():Add("Non-Working"):SetProperty("Def",16/*exCellSingleLine*/,.F.)
		oItems := oG2antt:Items()
			h := oItems:AddItem("12:30 to 14:00 Monday to Thursday, 12:30 to 13:30 on Friday")
			oItems:SetProperty("ItemNonworkingUnits",h,.F.,"weekday(value) case (default:((timeF(value)>=" + CHR(34) + "12:30:00" + CHR(34) + " and timeF(value) <=" + CHR(34) + "14:00:00" + CHR(34) + " ));5:( timeF(value)>=" + CHR(34) + "12:30:00" + CHR(34) + " and timeF(value) <=" + CHR(34) + "13:30:00" + CHR(34) + " );6:1;0:1) ")
			h := oItems:AddItem("10:45 to 13:45 Monday to Thursday, 10:45 to 14:30 on Friday")
			oItems:SetProperty("ItemNonworkingUnits",h,.F.,"weekday(value) case (default:((timeF(value)>=" + CHR(34) + "10:45:00" + CHR(34) + " and timeF(value) <=" + CHR(34) + "13:45:00" + CHR(34) + " ));5:( timeF(value)>=" + CHR(34) + "10:45:00" + CHR(34) + " and timeF(value) <=" + CHR(34) + "14:30:00" + CHR(34) + " );6:1;0:1) ")
			h := oItems:AddItem("2:30 to 9:30 on Friday, Saturday and Sunday")
			oItems:SetProperty("ItemNonworkingUnits",h,.F.,"weekday(value) case (default:((timeF(value)>=" + CHR(34) + "02:30:00" + CHR(34) + " and timeF(value) <=" + CHR(34) + "09:30:00" + CHR(34) + " ));1:0;2:0;3:0;4:0) ")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1279
Is it possible to define several type of progress bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oG2antt:Columns():Add("Start"):Visible := .F.
		oG2antt:Columns():Add("End"):Visible := .F.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,64)
			oBar := oChart:Bars():CallMethod("Copy","Progress","ProgressT")
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBar:Shape := 1/*exShapeSolid*/
				oBar:Height := 7
			oChart:Bars():Add("Task%ProgressT:Split"):Shortcut := "Task"
			oBar1 := oChart:Bars:Item("Progress")
				oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
				oBar1:Shape := 2/*exShapeSolidUp*/
			oChart:Bars():Add("Summary%Progress"):Shortcut := "Summary"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			oItems:SetProperty("ItemHeight",h,16)
			oItems:SetProperty("CellValue",h,1,"09/21/2006")
			oItems:SetProperty("CellValue",h,2,"10/03/2006")
			oItems:AddBar(h,"Summary",oItems:CellValue(h,1),oItems:CellValue(h,2),"sum")
			oItems:SetProperty("ItemBar",h,"sum",12/*exBarPercent*/,0.4)
			oItems:SetProperty("ItemBar",h,"sum",14/*exBarShowPercentCaption*/,.T.)
			h1 := oItems:InsertItem(h,,"Task 1")
			oItems:SetProperty("CellValue",h1,1,oItems:CellValue(h,1))
			oItems:SetProperty("CellValue",h1,2,"09/27/2006")
			oItems:AddBar(h1,"Task",oItems:CellValue(h1,1),oItems:CellValue(h1,2),"K1")
			oItems:SetProperty("ItemBar",h1,"K1",12/*exBarPercent*/,0.6)
			oItems:SetProperty("ItemBar",h1,"K1",14/*exBarShowPercentCaption*/,.T.)
			h2 := oItems:InsertItem(h,,"Task 2")
			oItems:SetProperty("CellValue",h2,1,oItems:CellValue(h1,2))
			oItems:SetProperty("CellValue",h2,2,"09/28/2006")
			oItems:AddBar(h2,"Unknown",oItems:CellValue(h2,1),oItems:CellValue(h2,2),"K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			h3 := oItems:InsertItem(h,,"Task 3")
			oItems:SetProperty("CellValue",h3,1,oItems:CellValue(h2,2))
			oItems:SetProperty("CellValue",h3,2,oItems:CellValue(h,2))
			oItems:AddBar(h3,"Task",oItems:CellValue(h3,1),oItems:CellValue(h3,2),"K3")
			oItems:SetProperty("ItemBar",h3,"K3",12/*exBarPercent*/,0.65)
			oItems:SetProperty("ItemBar",h3,"K3",14/*exBarShowPercentCaption*/,.T.)
			oItems:SetProperty("ItemBar",h3,"K3",39/*exBarPercentColor*/,32768)
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:GroupBars(h1,"K1",.F.,h2,"K2",.T.,31,"0;4")
			oItems:GroupBars(h2,"K2",.F.,h3,"K3",.T.,31,"0;2")
			oItems:DefineSummaryBars(h,"sum",h1,"K1")
			oItems:DefineSummaryBars(h,"sum",h2,"K2")
			oItems:DefineSummaryBars(h,"sum",h3,"K3")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBold",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1278
Is it possible to display the percent bar over the summary bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Progress")
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
				oBar:Shape := 2/*exShapeSolidUp*/
			oChart:Bars():Add("Summary%Progress"):Shortcut := "SummaryP"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Summary")
			oItems:AddBar(h,"SummaryP","01/02/2001","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",12/*exBarPercent*/,0.4)
			oItems:SetProperty("ItemBar",h,"K1",14/*exBarShowPercentCaption*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1277
How can I display the percent value in the lower side of the bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Progress")
				oBar:Shape := 1/*exShapeSolid*/
				oBar:Height := 7
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
			oChart:Bars():Add("Task%Progress"):Shortcut := "Percent"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Percent","01/02/2001","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",12/*exBarPercent*/,0.5)
			oItems:SetProperty("ItemBar",h,"K1",14/*exBarShowPercentCaption*/,.T.)
			oItems:SetProperty("ItemBar",h,"K1",43/*exBarVAlignPercent*/,2)
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Percent","01/03/2001","01/09/2001","K2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1276
Is it possible to change the percent's height

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Progress")
				oBar:Shape := 1/*exShapeSolid*/
				oBar:Height := 7
			oChart:Bars():Add("Task%Progress")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task%Progress","01/02/2001","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",12/*exBarPercent*/,0.5)
			oItems:SetProperty("ItemBar",h,"K1",14/*exBarShowPercentCaption*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1275
How can I change the pattern for the percent bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Progress")
				oBar:Pattern := 6/*exPatternBDiagonal*/
				oBar:Shape := 1/*exShapeSolid*/
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 196,0,0 } )  , .F. ))
			oChart:Bars():Add("Task%Progress")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task%Progress","01/02/2001","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",12/*exBarPercent*/,0.4)
			oItems:SetProperty("ItemBar",h,"K1",14/*exBarShowPercentCaption*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1274
How can I change the look for the percent bar using EBN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\hot.ebn")
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Progress")
				oBar:SetProperty("Color",0x1000000)
				oBar:Shape := 1/*exShapeSolid*/
				oBar:Height := 7
			oChart:Bars():Add("Task%Progress")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task%Progress","01/02/2001","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",12/*exBarPercent*/,0.4)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1273
Is it possible to align the percent bar to the bottom of the bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 32
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:Bars:Item("Task"):Height := 28
			oChart:Bars():Add("Task%Progress"):Shortcut := "Percent"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Percent","01/02/2001","01/14/2001","K1","text inside")
			oItems:SetProperty("ItemBar",h,"K1",5/*exBarVAlignCaption*/,0)
			oItems:SetProperty("ItemBar",h,"K1",12/*exBarPercent*/,0.75)
			oItems:SetProperty("ItemBar",h,"K1",14/*exBarShowPercentCaption*/,.T.)
			oItems:SetProperty("ItemBar",h,"K1",13/*exBarPercentCaptionFormat*/,"%p%")
			oItems:SetProperty("ItemBar",h,"K1",43/*exBarVAlignPercent*/,2)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1272
Is it possible to show the percent on the bottom side of the bar, so I can leave the text upside

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oBars
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 32
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:FirstVisibleDate := "01/01/2001"
			oBars := oChart:Bars()
				oBars:Item("Task"):Height := 28
				oBar := oBars:Item("Progress")
					oBar:Shape := 20/*exShapeThinDown*/
					oBar:Height := 20
					oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
				oBars:Add("Task%Progress"):Shortcut := "Percent"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Percent","01/02/2001","01/14/2001","K1","text inside")
			oItems:SetProperty("ItemBar",h,"K1",5/*exBarVAlignCaption*/,0)
			oItems:SetProperty("ItemBar",h,"K1",12/*exBarPercent*/,0.75)
			oItems:SetProperty("ItemBar",h,"K1",14/*exBarShowPercentCaption*/,.T.)
			oItems:SetProperty("ItemBar",h,"K1",13/*exBarPercentCaptionFormat*/,"<br>%p%")
			oItems:SetProperty("ItemBar",h,"K1",15/*exBarAlignPercentCaption*/,1)
			oItems:SetProperty("ItemBar",h,"K1",16/*exBarCanResizePercent*/,.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1271
Is it possible to assign a multiple lines labels/captions to a bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:SetProperty("ItemHeight",h,32)
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",3/*exBarCaption*/,"Line1<br>Line2")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1270
Does your control supports multiple lines tooltip
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:SetProperty("HTMLPicture","pic1","c:\exontrol\images\zipdisk.gif")
		oG2antt:ToolTipDelay := 1
		oG2antt:Columns():Add("tootip"):ToolTip := "<font Tahoma;20>This</font> is a <b>multi-lines</b> tooltip assigned to a column. The tooltip supports built-in HTML tags, icons and pictures.<br><img>pic1</img> picture ..."

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1269
It is possible to write the word in red/color or to add a tooltip or a link to the word

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/26/2000"
			oChart:SetProperty("PaneWidth",.F.,32)
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"","01/01/2001","01/05/2001","K1","some <fgcolor=FF0000>red</fgcolor> text")
			oItems:SetProperty("ItemBar",h1,"K1",10/*exBarCanResize*/,.F.)
			oItems:SetProperty("ItemBar",h1,"K1",6/*exBarToolTip*/,"And here goes the <b>tooltip</b> of the text. ")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","K2")
			oItems:SetProperty("ItemBar",h2,"K2",6/*exBarToolTip*/,"And here goes the <b>tooltip</b> of the bar. ")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"L<b>inke</b>d to a bar")
			oItems:SetProperty("Link","L1",13/*exLinkToolTip*/,"And here goes the <b>tooltip</b> of the link. ")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1268
It is possible to use seconds/minutes/hours as time scale in your control, but using my regional settings

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart,oChart1
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("Label",16/*exMonth*/,"<|><%loc_m1%><|><%loc_m2%><|><%loc_m3%><|><%loc_mmmm%><|><%loc_m3%> '<%yy%><|><%loc_mmmm%> <%yyyy%>")
			oChart:SetProperty("Label",256/*exWeek*/,"<|><%ww%><|><%loc_m3%> <%d%>, '<%yy%><r><%ww%><|><%loc_mmmm%> <%d%>, <%yyyy%><r><%ww%><||><||>256")
			oChart:SetProperty("Label",4096/*exDay*/,"<|><%loc_d1%><|><%loc_d2%><|><%loc_d3%><|><%loc_dddd%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%><|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%><||><||>4096")
			oChart:SetProperty("Label",65536/*exHour*/,"<|><%hh%><|><%h%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%><||><||>65536")
			oChart:SetProperty("Label",1048576/*exMinute*/,"<|><%nn%><|><%h%>:<%nn%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>")
			oChart:SetProperty("Label",16777216/*exSecond*/,"<|><%ss%><|><%nn%>:<%ss%><|><%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>")
			oChart:SetProperty("LabelToolTip",16/*exMonth*/,"<%loc_mmmm%>/<%yyyy%>")
			oChart:SetProperty("LabelToolTip",256/*exWeek*/,"<%loc_mmmm%> <%d%>, <%yyyy%> <%ww%>")
			oChart:SetProperty("LabelToolTip",4096/*exDay*/,"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%>")
			oChart:SetProperty("LabelToolTip",65536/*exHour*/,"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%>")
			oChart:SetProperty("LabelToolTip",1048576/*exMinute*/,"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>")
			oChart:SetProperty("LabelToolTip",16777216/*exSecond*/,"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>")
		oChart1 := oG2antt:Chart()
			oChart1:SetProperty("PaneWidth",.F.,0)
			oChart1:FirstVisibleDate := "01/01/2001"
			oChart1:LevelCount := 4
			oChart1:Level(0):Label := 4096
			oChart1:Level(1):Label := 65536
			oChart1:Level(2):Label := 1048576
			oLevel := oChart1:Level(3)
				oLevel:Count := 15
				oLevel:Label := 16777216
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1267
The chart's header is displayed in English. Can I change so it is the same as in my regional settings

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart,oChart1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("Label",16/*exMonth*/,"<|><%loc_m1%><|><%loc_m2%><|><%loc_m3%><|><%loc_mmmm%><|><%loc_m3%> '<%yy%><|><%loc_mmmm%> <%yyyy%>")
			oChart:SetProperty("Label",256/*exWeek*/,"<|><%ww%><|><%loc_m3%> <%d%>, '<%yy%><r><%ww%><|><%loc_mmmm%> <%d%>, <%yyyy%><r><%ww%><||><||>256")
			oChart:SetProperty("Label",4096/*exDay*/,"<|><%loc_d1%><|><%loc_d2%><|><%loc_d3%><|><%loc_dddd%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%><|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%><||><||>4096")
			oChart:SetProperty("Label",65536/*exHour*/,"<|><%hh%><|><%h%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%><||><||>65536")
			oChart:SetProperty("Label",1048576/*exMinute*/,"<|><%nn%><|><%h%>:<%nn%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>")
			oChart:SetProperty("Label",16777216/*exSecond*/,"<|><%ss%><|><%nn%>:<%ss%><|><%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>")
			oChart:SetProperty("LabelToolTip",16/*exMonth*/,"<%loc_mmmm%>/<%yyyy%>")
			oChart:SetProperty("LabelToolTip",256/*exWeek*/,"<%loc_mmmm%> <%d%>, <%yyyy%> <%ww%>")
			oChart:SetProperty("LabelToolTip",4096/*exDay*/,"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%>")
			oChart:SetProperty("LabelToolTip",65536/*exHour*/,"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%>")
			oChart:SetProperty("LabelToolTip",1048576/*exMinute*/,"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>")
			oChart:SetProperty("LabelToolTip",16777216/*exSecond*/,"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>")
		oChart1 := oG2antt:Chart()
			oChart1:SetProperty("PaneWidth",.F.,0)
			oChart1:FirstVisibleDate := "01/01/2001"
			oChart1:LevelCount := 2
			oChart1:UnitScale := 4096/*exDay*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1266
It is possible to use seconds/minutes/hours as time scale in your control
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 4
			oChart:Level(0):Label := 4096
			oChart:Level(1):Label := 65536
			oChart:Level(2):Label := 1048576
			oLevel := oChart:Level(3)
				oLevel:Count := 15
				oLevel:Label := 16777216
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1265
Is it possible to resize chart's column/level using the mouse as we can for the columns, but do not want to resize up to hours
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oInsideZoomFormat
	LOCAL oInsideZooms
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,32)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2008"
			oChart:AllowInsideZoom := .T.
			oChart:AllowResizeInsideZoom := .T.
			oChart:InsideZoomOnDblClick := .F.
			oInsideZoomFormat := oChart:DefaultInsideZoomFormat()
				oInsideZoomFormat:OwnerLabel := "<%d%>"
				oInsideZoomFormat:InsideLabel := ""
				oInsideZoomFormat:InsideUnit := 65536/*exHour*/
				oInsideZoomFormat:InsideCount := 24
				oInsideZoomFormat:DrawTickLines := .F.
				oInsideZoomFormat:DrawGridLines := .F.
			oInsideZooms := oChart:InsideZooms()
				oInsideZooms:SplitBaseLevel := .F.
				oInsideZooms:DefaultWidth := 18
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task"),"Task","01/03/2008","01/08/2008")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1264
Is it possible to resize chart's column/level using the mouse as we can for the columns
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oInsideZoomFormat
	LOCAL oInsideZooms
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,32)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2008"
			oChart:AllowInsideZoom := .T.
			oChart:AllowResizeInsideZoom := .T.
			oChart:InsideZoomOnDblClick := .F.
			oInsideZoomFormat := oChart:DefaultInsideZoomFormat()
				oInsideZoomFormat:OwnerLabel := "<%d%>"
				oInsideZoomFormat:InsideLabel := ""
				oInsideZoomFormat:DrawTickLines := .F.
				oInsideZoomFormat:DrawGridLines := .F.
			oInsideZooms := oChart:InsideZooms()
				oInsideZooms:SplitBaseLevel := .F.
				oInsideZooms:DefaultWidth := 18
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task"),"Task","01/03/2008","01/08/2008")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1263
How can I empty or clear the undo/redo queue
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:AllowUndoRedo := .T.
			oChart:FirstVisibleDate := "06/20/2005"
			oChart:AllowLinkBars := .T.
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/25/2005","")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/28/2005","07/02/2005","")
			DevOut( oG2antt:Chart():UndoListAction() )
			DevOut( "Clear undo/redo queue" )
			oG2antt:Chart():AllowUndoRedo := .F.
			oG2antt:Chart():AllowUndoRedo := .T.
			DevOut( oG2antt:Chart():UndoListAction() )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1262
How can I remove the undo/redo queue
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:AllowUndoRedo := .T.
			oChart:FirstVisibleDate := "06/20/2005"
			oChart:AllowLinkBars := .T.
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/25/2005","")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/28/2005","07/02/2005","")
			DevOut( oG2antt:Chart():UndoListAction() )
			DevOut( "Clear undo/redo queue" )
			oG2antt:Chart():UndoRemoveAction()
			oG2antt:Chart():RedoRemoveAction()
			DevOut( oG2antt:Chart():UndoListAction() )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1261
Is it possible to prevent adding an undo operation for instance the RemoveLink(LinkKey) I call during the AddLink event
PROCEDURE OnAddLink(oG2antt,LinkKey)
	oG2antt:Items():RemoveLink(LinkKey)
	oG2antt:Chart():UndoRemoveAction(10,1)
	oG2antt:Chart():UndoRemoveAction(11,1)
	DevOut( oG2antt:Chart:UndoListAction() )
RETURN

PROCEDURE OnChartEndChanging(oG2antt,Operation)
	DevOut( oG2antt:Chart:UndoListAction() )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddLink := {|LinkKey| OnAddLink(oG2antt,LinkKey)} /*Occurs when the user links two bars using the mouse.*/
		oG2antt:ChartEndChanging := {|Operation| OnChartEndChanging(oG2antt,Operation)} /*Occurs after the chart has been changed.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:AllowUndoRedo := .T.
			oChart:FirstVisibleDate := "06/20/2005"
			oChart:AllowLinkBars := .T.
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/25/2005","")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/28/2005","07/02/2005","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1260
Is it possible to rename the links from "Link1" to my choice
PROCEDURE OnAddLink(oG2antt,LinkKey)
	oG2antt:Items():SetProperty("Link",LinkKey,259/*exLinkKey*/,"newIDlink")
RETURN

PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	DevOut( Transform(oG2antt:Chart:LinkFromPoint(-1,-1),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddLink := {|LinkKey| OnAddLink(oG2antt,LinkKey)} /*Occurs when the user links two bars using the mouse.*/
		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "06/20/2005"
			oChart:AllowLinkBars := .T.
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/25/2005","")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/28/2005","07/02/2005","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1259
How can I prevent highlighting the column from the cursor - point

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAEGg4BI0IQAAYAQGKIYBkAKBQAGaAoDDUOQzQwAAxDKKUEwsACEIrjKCYVgOHYYRrIMYgBCMJhLEoaZLhEZRQiqDYtRDFQBSDDcPw/EaRZohGaYJgEgI=")
		oG2antt:SetProperty("Background",32/*exCursorHoverColumn*/,0x1000000)
		oG2antt:Columns():Add("S"):Width := 32
		oG2antt:Columns():Add("Level 1"):LevelKey := 1
		oG2antt:Columns():Add("Level 2"):LevelKey := 1
		oG2antt:Columns():Add("Level 3"):LevelKey := 1
		oG2antt:Columns():Add("E1"):Width := 32
		oG2antt:Columns():Add("E2"):Width := 32
		oG2antt:Columns():Add("E3"):Width := 32
		oG2antt:Columns():Add("E4"):Width := 32

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1258
Is it possible to specify the background color for the item in the chart part only
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h,hC

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			hC := oItems:InsertItem(h,,"Child 1")
			oG2antt:Chart():SetProperty("ItemBackColor",hC,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1257
Is it possible to apply different visual appearance, color, sizes for item in the list and chart part

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h,hC

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oG2antt:VisualAppearance():Add(2,"c:\exontrol\images\pushed.ebn")
		oG2antt:VisualAppearance():Add(3,"CP:2 2 2 -2 -2")
		oG2antt:Columns():Add("Default")
		oG2antt:SelBackMode := 1/*exTransparent*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			hC := oItems:InsertItem(h,,"Child 1")
			oItems:SetProperty("ItemBackColor",hC,0x1ffff00)
			oG2antt:Chart():SetProperty("ItemBackColor",hC,0x300ff00)
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1256
How do I change the visual appearance for the entire item, using your EBN technology

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h,hC

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			hC := oItems:InsertItem(h,,"Child 1")
			oItems:SetProperty("ItemBackColor",hC,0x1000000)
			oG2antt:Chart():SetProperty("ItemBackColor",hC,0x1000000)
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1255
is it possible to specify the a different background color for the item, list and chart part

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h,hC

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			hC := oItems:InsertItem(h,,"Child 1")
			oItems:SetProperty("ItemBackColor",hC,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oG2antt:Chart():SetProperty("ItemBackColor",hC,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,0 } )  , .F. ))
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1254
Is it possible to specify the background color for the entire row, including the chart part

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h,hC

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			hC := oItems:InsertItem(h,,"Child 1")
			oItems:SetProperty("ItemBackColor",hC,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oG2antt:Chart():SetProperty("ItemBackColor",hC,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1253
Is it possible to prevent overlaying the bars while moving or resizing the bars, so they get arranged once the bar is moved or resized
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:Columns():Add("Task")
		oG2antt:DrawGridLines := 1/*exHLines*/
		oChart := oG2antt:Chart()
			oChart:OverlaidOnMoving := .F.
			oChart:DrawGridLines := 1/*exHLines*/
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:AllowLinkBars := .F.
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:Bars:Item("Task"):OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/07/2001","01/10/2001","A1")
			oItems:AddBar(h,"Task","01/08/2001","01/12/2001","A3")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1252
Is it possible display numbers in the same format no matter of regional settings in the control panel
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:Columns():Add("Def"):SetProperty("Def",17/*exCellValueFormat*/,1)
		oItems := oG2antt:Items()
			h := oItems:AddItem(100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default positive)'")
			h := oItems:AddItem(100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '2|.|3|,|1|1')")
			h := oItems:AddItem(-100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default negative)'")
			h := oItems:AddItem(-100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '2|.|3|,|1|1')")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1251
Is it possible to add a 0 for numbers less than 1 instead .7 to show 0.8
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:Columns():Add("Def"):SetProperty("Def",17/*exCellValueFormat*/,1)
		oItems := oG2antt:Items()
			h := oItems:AddItem(0.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default)'")
			h := oItems:AddItem(0.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '|||||0') +  ' <fgcolor=808080>(Display no leading zeros)'")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1250
How can I specify the format for negative numbers
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:Columns():Add("Def"):SetProperty("Def",17/*exCellValueFormat*/,1)
		oItems := oG2antt:Items()
			h := oItems:AddItem(-100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default)'")
			h := oItems:AddItem(-100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '||||1') +  ' <fgcolor=808080>(Negative sign, number; for example, -1.1)'")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1249
Is it possible to change the grouping character when display numbers
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:Columns():Add("Def"):SetProperty("Def",17/*exCellValueFormat*/,1)
		oItems := oG2antt:Items()
			h := oItems:AddItem(100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default)'")
			h := oItems:AddItem(100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '|||-') +  ' <fgcolor=808080>(grouping character is -)'")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1248
How can I display numbers with 2 digits in each group
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:Columns():Add("Def"):SetProperty("Def",17/*exCellValueFormat*/,1)
		oItems := oG2antt:Items()
			h := oItems:AddItem(100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default)'")
			h := oItems:AddItem(100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '||2') +  ' <fgcolor=808080>(grouping by 2 digits)'")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1247
How can I display my numbers using a different decimal separator
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:Columns():Add("Def"):SetProperty("Def",17/*exCellValueFormat*/,1)
		oItems := oG2antt:Items()
			h := oItems:AddItem(100.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default)'")
			h := oItems:AddItem(100.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '|;') +  ' <fgcolor=808080>(decimal separator is <b>;</b>)'")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1246
Is it possible to display the numbers using 3 (three) digits
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:Columns():Add("Def"):SetProperty("Def",17/*exCellValueFormat*/,1)
		oItems := oG2antt:Items()
			h := oItems:AddItem(100.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default)'")
			h := oItems:AddItem(100.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '3') +  ' <fgcolor=808080>(3 digits)'")
			h := oItems:AddItem(100.27)
			oItems:SetProperty("FormatCell",h,0,"(value format 2) +  '  <fgcolor=808080>(2 digits)'")
			h := oItems:AddItem(100.27)
			oItems:SetProperty("FormatCell",h,0,"(value format 1) +  ' <fgcolor=808080>(1 digit)'")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1245
Is it possible to format numbers

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1,oColumn2,oColumn3
	LOCAL oColumns
	LOCAL oItems
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oG2antt:SetProperty("SelBackColor",oG2antt:BackColor())
		oG2antt:SetProperty("SelForeColor",oG2antt:ForeColor())
		oG2antt:ShowFocusRect := .T.
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumns := oG2antt:Columns()
			oColumns:Add("Name")
			oColumn := oColumns:Add("A")
				oColumn:SortType := 1/*SortNumeric*/
				oColumn:AllowSizing := .F.
				oColumn:Width := 36
				oColumn:FormatColumn := "len(value) ? value + ' +'"
				oColumn:Editor():EditType := 4/*SpinType*/
			oColumn1 := oColumns:Add("B")
				oColumn1:SortType := 1/*SortNumeric*/
				oColumn1:AllowSizing := .F.
				oColumn1:Width := 36
				oColumn1:FormatColumn := "len(value) ? value + ' +'"
				oColumn1:Editor():EditType := 4/*SpinType*/
			oColumn2 := oColumns:Add("C")
				oColumn2:SortType := 1/*SortNumeric*/
				oColumn2:AllowSizing := .F.
				oColumn2:Width := 36
				oColumn2:FormatColumn := "len(value) ? value + ' ='"
				oColumn2:Editor():EditType := 4/*SpinType*/
			oColumn3 := oColumns:Add("A+B+C")
				oColumn3:SortType := 1/*SortNumeric*/
				oColumn3:Width := 64
				oColumn3:ComputedField := "dbl(%1)+dbl(%2)+dbl(%3)"
				oColumn3:FormatColumn := "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=0000FF>+'+(value format '2|.|3|,' ): '0.00') )"
				oColumn3:SetProperty("Def",17/*exCellValueFormat*/,1)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:SetProperty("CellValueFormat",h,4,2/*exComputedField*/)
			h1 := oItems:InsertItem(h,,"Child 1")
			oItems:SetProperty("CellValue",h1,1,7)
			oItems:SetProperty("CellValue",h1,2,3)
			oItems:SetProperty("CellValue",h1,3,1)
			h1 := oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("CellValue",h1,1,-2)
			oItems:SetProperty("CellValue",h1,2,-2)
			oItems:SetProperty("CellValue",h1,3,-4)
			h1 := oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("CellValue",h1,1,2)
			oItems:SetProperty("CellValue",h1,2,2)
			oItems:SetProperty("CellValue",h1,3,-4)
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1244
How can I show the tooltip programmatically ( I want to be able to set the tooltip content dynamically just before the tooltip start to appear, not using the exBarTooltip )
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	oG2antt:ShowToolTip(oG2antt:Chart:BarFromPoint(-1,-1),"",2,"4","-4")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Def")
		oChart := oG2antt:Chart()
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2010"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A")
			oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B")
			oItems:AddBar(h,"Task","01/08/2010","01/11/2010","C","C")
			oItems:GroupBars(h,"A",.F.,h,"B",.T.,39)
			oItems:GroupBars(h,"B",.F.,h,"C",.T.,39)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1243
How can I set the column's width to my desired width
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumns

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:ColumnAutoResize := .F.
		oColumns := oG2antt:Columns()
			oColumns:Add("A"):Width := 128
			oColumns:Add("B"):Width := 128
		oG2antt:DrawGridLines := -1/*exAllLines*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1242
Is it possible to prevent intersection of three bars or more

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Def")
		oChart := oG2antt:Chart()
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2010"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A")
			oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B")
			oItems:AddBar(h,"Task","01/08/2010","01/11/2010","C","C")
			oItems:GroupBars(h,"A",.F.,h,"B",.T.,39)
			oItems:GroupBars(h,"B",.F.,h,"C",.T.,39)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1241
Is it possible to prevent intersection of two bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Def")
		oChart := oG2antt:Chart()
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2010"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A")
			oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B")
			oItems:GroupBars(h,"A",.F.,h,"B",.T.,39)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1240
Is it possible to specify the cell's value but still want to display some formatted text instead the value
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:Columns():Add("Value")
		oG2antt:Columns():Add("FormatCell")
		oItems := oG2antt:Items()
			h := oItems:AddItem(1)
			oItems:SetProperty("CellValue",h,1,12)
			oItems:SetProperty("FormatCell",h,1,"currency(value)")
			h := oItems:AddItem("01/01/2001")
			oItems:SetProperty("CellValue",h,1,"01/01/2001")
			oItems:SetProperty("CellValueFormat",h,1,1/*exHTML*/)
			oItems:SetProperty("FormatCell",h,1,"longdate(value) replace '2001' with '<b>2001</b>'")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1239
How can I simulate displaying groups

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumns
	LOCAL oItems
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:HasLines := 0/*exNoLine*/
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumns := oG2antt:Columns()
			oColumns:Add("Name")
			oColumns:Add("A")
			oColumns:Add("B")
			oColumns:Add("C")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Group 1")
			oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemDividerLineAlignment",h,3/*DividerBoth*/)
			oItems:SetProperty("ItemHeight",h,24)
			oItems:SetProperty("SortableItem",h,.F.)
			h1 := oItems:InsertItem(h,,"Child 1")
			oItems:SetProperty("CellValue",h1,1,1)
			oItems:SetProperty("CellValue",h1,2,2)
			oItems:SetProperty("CellValue",h1,3,3)
			h1 := oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("CellValue",h1,1,4)
			oItems:SetProperty("CellValue",h1,2,5)
			oItems:SetProperty("CellValue",h1,3,6)
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Group 2")
			oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemDividerLineAlignment",h,3/*DividerBoth*/)
			oItems:SetProperty("ItemHeight",h,24)
			oItems:SetProperty("SortableItem",h,.F.)
			h1 := oItems:InsertItem(h,,"Child 1")
			oItems:SetProperty("CellValue",h1,1,1)
			oItems:SetProperty("CellValue",h1,2,2)
			oItems:SetProperty("CellValue",h1,3,3)
			h1 := oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("CellValue",h1,1,4)
			oItems:SetProperty("CellValue",h1,2,5)
			oItems:SetProperty("CellValue",h1,3,6)
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1238
Is it possible to specify the cell's value but still want to display some formatted text instead the value

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:MarkSearchColumn := .F.
		oColumns := oG2antt:Columns()
			oColumns:Add("Name")
			oColumn := oColumns:Add("Values")
				oColumn:SortType := 1/*SortNumeric*/
				oColumn:AllowSizing := .F.
				oColumn:Width := 64
				oColumn:FormatColumn := "((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)"
				oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:SetProperty("FormatCell",h,1,"'<none>'")
			oItems:SetProperty("CellValue",oItems:InsertItem(h,,"Child 1"),1,10)
			oItems:SetProperty("CellValue",oItems:InsertItem(h,,"Child 2"),1,15)
			oItems:SetProperty("CellValue",oItems:InsertItem(h,,"Child 3"),1,25)
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1237
I am using the FormatColumn to display the current currency, but would like hide some values. Is it possible

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:MarkSearchColumn := .F.
		oColumns := oG2antt:Columns()
			oColumns:Add("Name")
			oColumn := oColumns:Add("Values")
				oColumn:SortType := 1/*SortNumeric*/
				oColumn:AllowSizing := .F.
				oColumn:Width := 64
				oColumn:FormatColumn := "((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)"
				oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:SetProperty("FormatCell",h,1," ")
			oItems:SetProperty("CellValue",oItems:InsertItem(h,,"Child 1"),1,10)
			oItems:SetProperty("CellValue",oItems:InsertItem(h,,"Child 2"),1,15)
			oItems:SetProperty("CellValue",oItems:InsertItem(h,,"Child 3"),1,25)
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1236
I have a right-aligned column with check-boxes with no text, but it is not perfectly aligned. Is there something I can do
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:TreeColumnIndex := -1
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:ShowFocusRect := .F.
		oColumns := oG2antt:Columns()
			oColumn := oColumns:Add("Default-Right")
				oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn:Alignment := 2/*RightAlignment*/
				oColumn:HeaderAlignment := 2/*RightAlignment*/
			oColumn1 := oColumns:Add("Custom-Right")
				oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn1:SetProperty("Def",34/*exCellDrawPartsOrder*/,"icon,icons,picture,caption,check")
				oColumn1:HeaderAlignment := 2/*RightAlignment*/
				oColumn1:Alignment := 2/*RightAlignment*/
		oItems := oG2antt:Items()
			oItems:AddItem()
			oItems:AddItem()
			oItems:AddItem()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1235
How can I specify that once I move or resize a bar other should be automatically moved/resized
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oG2antt:Columns():Add("Tasks")
		oG2antt:Columns():Add("Start"):Visible := .F.
		oG2antt:Columns():Add("End"):Visible := .F.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,64)
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Item 1")
			oItems:SetProperty("CellValue",h1,1,"09/21/2006")
			oItems:SetProperty("CellValue",h1,2,"09/24/2006")
			oItems:AddBar(h1,"Task",oItems:CellValue(h1,1),oItems:CellValue(h1,2),"")
			h2 := oItems:AddItem("Item 2")
			oItems:SetProperty("CellValue",h2,1,"09/21/2006")
			oItems:SetProperty("CellValue",h2,2,"09/24/2006")
			oItems:AddBar(h2,"Task",oItems:CellValue(h2,1),oItems:CellValue(h2,2),"")
			oItems:GroupBars(h1,"",.T.,h2,"",.T.)
			oItems:GroupBars(h1,"",.F.,h2,"",.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1234
How can I specify that once I move a bar other should be automatically moved
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oG2antt:Columns():Add("Tasks")
		oG2antt:Columns():Add("Start"):Visible := .F.
		oG2antt:Columns():Add("End"):Visible := .F.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,64)
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Item 1")
			oItems:SetProperty("CellValue",h1,1,"09/21/2006")
			oItems:SetProperty("CellValue",h1,2,"09/24/2006")
			oItems:AddBar(h1,"Task",oItems:CellValue(h1,1),oItems:CellValue(h1,2),"")
			h2 := oItems:AddItem("Item 2")
			oItems:SetProperty("CellValue",h2,1,"09/21/2006")
			oItems:SetProperty("CellValue",h2,2,"09/24/2006")
			oItems:AddBar(h2,"Task",oItems:CellValue(h2,1),oItems:CellValue(h2,2),"")
			oItems:GroupBars(h1,"",.T.,h2,"",.T.,3)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1233
Is it possible to include the bar's caption in overlaying

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:Columns():Add("Task")
		oG2antt:DrawGridLines := 1/*exHLines*/
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := 1/*exHLines*/
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:AllowLinkBars := .F.
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 4611/*exOverlaidBarsIncludeCaption+exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
				oBar:OverlaidGroup := "Milestone"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1","task")
			oItems:SetProperty("ItemBar",h,"A1",4/*exBarHAlignCaption*/,18)
			oItems:AddBar(h,"Milestone","01/03/2001","01/03/2001","M","milestone")
			oItems:SetProperty("ItemBar",h,"M",4/*exBarHAlignCaption*/,18)
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/08/2001","01/12/2001","A1","task")
			oItems:SetProperty("ItemBar",h,"A1",4/*exBarHAlignCaption*/,18)
			oItems:AddBar(h,"Milestone","01/08/2001","01/08/2001","M","milestone")
			oItems:SetProperty("ItemBar",h,"M",4/*exBarHAlignCaption*/,18)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1232
Sometimes, the milestone bars are not overlaying the task bars. What I am doing wrong
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:Columns():Add("Task")
		oG2antt:DrawGridLines := 1/*exHLines*/
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := 1/*exHLines*/
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:AllowLinkBars := .F.
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 4611/*exOverlaidBarsIncludeCaption+exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
				oBar:OverlaidGroup := "Milestone"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"Milestone","01/03/2001","01/03/2001","M")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/07/2001","01/10/2001","A1")
			oItems:AddBar(h,"Milestone","01/08/2001","01/08/2001","M")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1231
Is it possible to add milestone bars in the same overlaid group as task is

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:Columns():Add("Task")
		oG2antt:DrawGridLines := 1/*exHLines*/
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := 1/*exHLines*/
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:AllowLinkBars := .F.
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
				oBar:OverlaidGroup := "Milestone"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"Milestone","01/03/2001","01/03/2001","M")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/07/2001","01/10/2001","A1")
			oItems:AddBar(h,"Milestone","01/08/2001","01/08/2001","M")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1230
When adding a date column and setting the SortType to SortTypeEnum.SortDateTime, the column still sorts as a string. What am I doing wrong
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Date"):SortType := 3/*SortDateTime*/
		oG2antt:Columns():Add("String")
		oItems := oG2antt:Items()
			h := oItems:AddItem("01/01/2001")
			oItems:SetProperty("CellValue",h,1,oItems:CellValue(h,0))
			h := oItems:AddItem("01/11/2001")
			oItems:SetProperty("CellValue",h,1,oItems:CellValue(h,0))
			h := oItems:AddItem("01/02/2001")
			oItems:SetProperty("CellValue",h,1,oItems:CellValue(h,0))
		oG2antt:Columns:Item(0):SortOrder := 2/*SortDescending*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1229
Is it possible to move an item from a parent to another
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Columns():Add("Items")
		oItems := oG2antt:Items()
			oItems:AddItem("A")
			oItems:AddItem("B")
			oItems:InsertItem(oItems:AddItem("C"),"","D")
			oItems:SetParent(oItems:FindItem("D",0),oItems:FindItem("A",0))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1228
How can I change the identation for an item
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Columns():Add("Items")
		oItems := oG2antt:Items()
			oItems:AddItem("A")
			oItems:AddItem("B")
			oItems:InsertItem(oItems:AddItem("C"),"","D")
			oItems:SetParent(oItems:FindItem("D",0),0)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1227
Moving the bars fail if I am using GroupBars, exBarCanResize on 0 and exBarKeepWorkingCount on True ( bars keeps the working units and at runtime user can not resize them ). Is it possible to use the GroupBars while user should not be able to resize the bars at runtime

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
			oChart:Bars():Add("Task:Split"):Shortcut := "Task"
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/26/2006","09/29/2006","","A")
			oItems:SetProperty("ItemBar",h1,"",20/*exBarKeepWorkingCount*/,.T.)
			oItems:SetProperty("ItemBar",h1,"",10/*exBarCanResize*/,4)
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","09/26/2006","09/29/2006","","B")
			oItems:SetProperty("ItemBar",h2,"",20/*exBarKeepWorkingCount*/,.T.)
			oItems:SetProperty("ItemBar",h2,"",10/*exBarCanResize*/,4)
			oItems:AddLink("L1",h1,"",h2,"")
			oItems:SetProperty("Link","L1",6/*exLinkStartPos*/,2)
			oItems:SetProperty("Link","L1",7/*exLinkEndPos*/,0)
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval + exLimitIntervalTreatAsWorking")
			oItems:GroupBars(h1,"",.F.,h2,"",.T.,95,"2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1226
How can I collapse all items
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Columns():Add("Items")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",0,.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1225
How can I expand all items
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Columns():Add("Items")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",0,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1224
How can I specify the distance between bars to be in a specified range of working units

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
			oChart:Bars():Add("Task:Split"):Shortcut := "Task"
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/26/2006","09/29/2006","","A")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","09/26/2006","09/29/2006","","B")
			oItems:AddLink("L1",h1,"",h2,"")
			oItems:SetProperty("Link","L1",6/*exLinkStartPos*/,2)
			oItems:SetProperty("Link","L1",7/*exLinkEndPos*/,0)
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval+exLimitIntervalTreatAsWorking")
			oItems:GroupBars(h1,"",.F.,h2,"",.T.,95,"0;1;5")
			oItems:SetProperty("ItemBar",0,"<*>",20/*exBarKeepWorkingCount*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1223
How can I specify the distance between bars to be in a specified range

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/26/2006","09/29/2006","","A")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","09/26/2006","09/29/2006","","B")
			oItems:AddLink("L1",h1,"",h2,"")
			oItems:SetProperty("Link","L1",6/*exLinkStartPos*/,2)
			oItems:SetProperty("Link","L1",7/*exLinkEndPos*/,0)
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"exPreserveBarLength + exIgnoreOriginalInterval + exLimitInterval")
			oItems:GroupBars(h1,"",.F.,h2,"",.T.,31,"0;1;7")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1222
How can I specify the distance between bars to be no more than a specified value in working units

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
			oChart:Bars():Add("Task:Split"):Shortcut := "Task"
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/26/2006","09/29/2006","","A")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","09/26/2006","09/29/2006","","B")
			oItems:AddLink("L1",h1,"",h2,"")
			oItems:SetProperty("Link","L1",6/*exLinkStartPos*/,2)
			oItems:SetProperty("Link","L1",7/*exLinkEndPos*/,0)
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval+exLimitIntervalTreatAsWorking")
			oItems:GroupBars(h1,"",.F.,h2,"",.T.,95,"0;0;2")
			oItems:SetProperty("ItemBar",0,"<*>",20/*exBarKeepWorkingCount*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1221
How can I specify the distance between bars to be no more than a specified value

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/26/2006","09/29/2006","","A")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","09/26/2006","09/29/2006","","B")
			oItems:AddLink("L1",h1,"",h2,"")
			oItems:SetProperty("Link","L1",6/*exLinkStartPos*/,2)
			oItems:SetProperty("Link","L1",7/*exLinkEndPos*/,0)
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"exPreserveBarLength + exIgnoreOriginalInterval + exLimitInterval")
			oItems:GroupBars(h1,"",.F.,h2,"",.T.,31,"0;0;2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1220
How can I specify the distance between bars to be no less than a specified value in working units

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
			oChart:Bars():Add("Task:Split"):Shortcut := "Task"
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/26/2006","09/29/2006","","A")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","09/26/2006","09/29/2006","","B")
			oItems:AddLink("L1",h1,"",h2,"")
			oItems:SetProperty("Link","L1",6/*exLinkStartPos*/,2)
			oItems:SetProperty("Link","L1",7/*exLinkEndPos*/,0)
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitIntervalMin + exLimitIntervalTreatAsWorking")
			oItems:GroupBars(h1,"",.F.,h2,"",.T.,79,"2")
			oItems:SetProperty("ItemBar",0,"<*>",20/*exBarKeepWorkingCount*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1219
How can I specify the distance between bars to be no less than a specified value

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/26/2006","09/29/2006","","A")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","09/26/2006","09/29/2006","","B")
			oItems:AddLink("L1",h1,"",h2,"")
			oItems:SetProperty("Link","L1",6/*exLinkStartPos*/,2)
			oItems:SetProperty("Link","L1",7/*exLinkEndPos*/,0)
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"exPreserveBarLength + exIgnoreOriginalInterval + exLimitIntervalMin")
			oItems:GroupBars(h1,"",.F.,h2,"",.T.,15,"2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1218
How do I specify the distance between bars to be exactly the specified value in working units

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
			oChart:Bars():Add("Task:Split"):Shortcut := "Task"
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/26/2006","09/29/2006","","A")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","09/26/2006","09/29/2006","","B")
			oItems:AddLink("L1",h1,"",h2,"")
			oItems:SetProperty("Link","L1",6/*exLinkStartPos*/,2)
			oItems:SetProperty("Link","L1",7/*exLinkEndPos*/,0)
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval + exLimitIntervalTreatAsWorking")
			oItems:GroupBars(h1,"",.F.,h2,"",.T.,95,"2")
			oItems:SetProperty("ItemBar",0,"<*>",20/*exBarKeepWorkingCount*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1217
How do I specify the distance between bars to be exactly the specified value

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/26/2006","09/29/2006","","A")
			oItems:AddItem("")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Unknown","09/26/2006","09/29/2006","","B")
			oItems:AddLink("L1",h1,"",h2,"")
			oItems:SetProperty("Link","L1",6/*exLinkStartPos*/,2)
			oItems:SetProperty("Link","L1",7/*exLinkEndPos*/,0)
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"exPreserveBarLength + exIgnoreOriginalInterval")
			oItems:GroupBars(h1,"",.F.,h2,"",.T.,7,"2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1216
How do I specify the day's duration to be working only
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oG2antt:Chart():Bars():Add("Task:Split"):Shortcut := "Task"
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/26/2006","09/29/2006","A")
			oItems:SetProperty("ItemBar",h1,"A",20/*exBarKeepWorkingCount*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1215
How do I specify the the user can't resize the bar at left side ( starting point )
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oG2antt:Chart():Bars():Add("Task:Split"):Shortcut := "Task"
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/26/2006","09/29/2006","A","not resizable on left")
			oItems:SetProperty("ItemBar",h1,"A",20/*exBarKeepWorkingCount*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1214
How do I specify the the user can't resize the bar at left side ( starting point )
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/26/2006","09/29/2006","A","not resizable on left")
			oItems:SetProperty("ItemBar",h1,"A",10/*exBarCanResize*/,2)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1213
How do I specify the the user can't resize the bar at right side ( ending point )
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/26/2006","09/29/2006","A","not resizable on right")
			oItems:SetProperty("ItemBar",h1,"A",10/*exBarCanResize*/,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1212
How do I specify the the user can't resize the bar at runtime
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/26/2006","09/29/2006","A","not resizable")
			oItems:SetProperty("ItemBar",h1,"A",10/*exBarCanResize*/,.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1211
How do I specify the day's duration to be at least a specified length
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/26/2006","09/29/2006","A","> 2 Days")
			oItems:SetProperty("ItemBar",h1,"A",36/*exBarMinDuration*/,2)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1210
How do I specify the day's duration to be maximum a specified length
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/26/2006","09/29/2006","A","< 3 Days")
			oItems:SetProperty("ItemBar",h1,"A",37/*exBarMaxDuration*/,3)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1209
I am trying to construct a timeline that is not date specific. My timeline starts at T=00:00:00 and then increases by 5 seconds. Is it possible

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstVisibleDate := 0
			oChart:UnitWidth := 48
			oChart:NonworkingDays := 0
			oLevel := oChart:Level(0)
				oLevel:Label := "<%hh%>:<%nn%>:<%ss%>"
				oLevel:Unit := 16777216/*exSecond*/
				oLevel:Count := 5

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1208
How can I specify the levels using the user's Regional and Language Options

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oLevel,oLevel1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Font():Name := "Arial Unicode MS"
		oG2antt:HeaderHeight := 36
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "05/30/2010"
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:UnitWidth := 36
			oChart:LevelCount := 2
			oLevel := oChart:Level(0)
				oLevel:Label := "<b><%loc_mmmm%></b> <%yyyy%><br><%loc_sdate%><r> <%ww%> "
				oLevel:ToolTip := oLevel:Label()
				oLevel:Unit := 256/*exWeek*/
			oLevel1 := oChart:Level(1)
				oLevel1:Label := "<%loc_ddd%><br><%d%>"
				oLevel1:ToolTip := oLevel1:Label()
			oChart:ToolTip := "<%loc_ldate%>"
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1207
How do I arrange, format or layout the item on multiple levels or lines, as a subform

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL var_Column,var_Column1,var_Column2,var_Column3,var_Column4,var_Column5,var_Column6
	LOCAL oColumns
	LOCAL oEditor,var_Editor
	LOCAL oItems
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:HeaderVisible := 0/*exHeaderHidden*/
		oG2antt:ItemsAllowSizing := -1/*exResizeItem*/
		oG2antt:MarkSearchColumn := .F.
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",0x80000012)
		oColumns := oG2antt:Columns()
			oColumns:Add("")
			var_Column := oColumns:Add("Column")
				var_Column:Visible := .F.
				var_Column:Editor():EditType := 1/*EditType*/
			var_Column1 := oColumns:Add("Column")
				var_Column1:Visible := .F.
				var_Column1:Editor():EditType := 2/*DropDownType*/
			var_Column2 := oColumns:Add("Column")
				var_Column2:Visible := .F.
				var_Column2:Editor():EditType := 2/*DropDownType*/
			var_Column3 := oColumns:Add("Column")
				var_Column3:Visible := .F.
				oEditor := var_Column3:Editor()
					oEditor:EditType := 19/*CheckValueType*/
					oEditor:SetProperty("Option",17/*exCheckValue2*/,1)
			var_Column4 := oColumns:Add("Column")
				var_Column4:Visible := .F.
				var_Column4:Editor():EditType := 7/*DateType*/
			oColumns:Add("Column"):Visible := .F.
			var_Column5 := oColumns:Add("Column")
				var_Column5:Visible := .F.
				var_Column5:Editor():EditType := 2/*DropDownType*/
			var_Column6 := oColumns:Add("Column")
				var_Column6:Visible := .F.
				var_Column6:SetProperty("Def",16/*exCellSingleLine*/,0)
				var_Editor := var_Column6:Editor()
					var_Editor:EditType := 5/*MemoType*/
					var_Editor:ButtonWidth := 17
					var_Editor:SetProperty("Option",23/*exDownArrow*/,0)
					var_Editor:SetProperty("Option",25/*exEndKey*/,0)
					var_Editor:SetProperty("Option",24/*exHomeKey*/,0)
					var_Editor:SetProperty("Option",20/*exLeftArrow*/,0)
					var_Editor:SetProperty("Option",3/*exMemoAutoSize*/,0)
					var_Editor:SetProperty("Option",2/*exMemoVScrollBar*/,-1)
					var_Editor:SetProperty("Option",27/*exPageDownKey*/,0)
					var_Editor:SetProperty("Option",26/*exPageUpKey*/,0)
					var_Editor:SetProperty("Option",21/*exRightArrow*/,0)
					var_Editor:SetProperty("Option",22/*exUpArrow*/,0)
				var_Column6:Visible := .F.
			oColumns:Add("Column"):Visible := .F.
		oItems := oG2antt:Items()
			h0 := oItems:AddItem("")
			oItems:SetProperty("CellValue",h0,9,"Dismiss")
			oItems:SetProperty("CellFormatLevel",h0,0,"12;" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(248,248,248)]/(" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(248,248,248)]:12,(1;" + CHR(34) + " " + CHR(34) + "[b=0]/(" + CHR(34) + " " + CHR(34) + "[b=0]:1,(25;(5;" + CHR(34) + " " + CHR(34) + "[b=0]/((" + CHR(34) + "Subject:" + CHR(34) + "[b=0]:80,(1;" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]/(" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]:1,(" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(255,0,0)]:5,1[b=0])," + CHR(34) + " " + CHR(34) + "[b=0][bg=" +;
		"RGB(0,0,0)]:1)/1;" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]))/1;" + CHR(34) + " " + CHR(34) + "[b=0]))/20;(" + CHR(34) + "Location:" + CHR(34) + "[b=0]:80,(1;" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]/(" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]:1,2[b=0]," + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]:1)/1;" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]),((" + CHR(34) + " " + CHR(34) + "[b=0]:10," + CHR(34) + "Label:" + CHR(34) + "[b=0])):50,(1;" + CHR(34) + " " + CHR(34) +" +;
		" "[b=0][bg=RGB(0,0,0)]/(" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]:1,3[b=0]," + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]:1)/1;" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]))/50;(10;" + CHR(34) + " " + CHR(34) + "[b=0]/(1;" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(255,0,0)]/(" + CHR(34) + "Recurrence:" + CHR(34) + "[b=0]:80," + CHR(34) + "Occurs every day effective 20/04/2007 from 01:00 to 01:01." + CHR(34) + "[b=0])/1;" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(255,0,0)])/10;" + CHR(3" +;
		"4) + " " + CHR(34) + "[b=0])/23;(4[b=0]:20," + CHR(34) + "Reminder:" + CHR(34) + "[b=0]:60,(1;" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]/(" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]:1,5[b=0]," + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]:1)/1;" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]),((" + CHR(34) + " " + CHR(34) + "[b=0]:5,6[b=0])):30,((" + CHR(34) + " " + CHR(34) + "[b=0]:10," + CHR(34) + "Show time as:" + CHR(34) + "[b=0])):90,(1;" + CHR(34) + " " + CHR(34) + "[b=0][bg=RG" +;
		"B(0,0,0)]/(" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]:1,7[b=0]," + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]:1)/1;" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]))/(12;" + CHR(34) + " " + CHR(34) + "[b=0]/(1;" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]/(" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]:1,8[b=0]," + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]:1)/1;" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(0,0,0)]))/35;(5;" + CHR(34) + " " + CHR(34) + "[b=0]/(" + CHR(34) + " " +;
		"" + CHR(34) + "[b=0]," + CHR(34) + " " + CHR(34) + "[b=0],((" + CHR(34) + " " + CHR(34) + "[b=0]:40,9[b=0])))/5;" + CHR(34) + " " + CHR(34) + "[b=0]))," + CHR(34) + " " + CHR(34) + "[b=0]:1)/1;" + CHR(34) + " " + CHR(34) + "[b=0])," + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(248,248,248)]:12)/12;" + CHR(34) + " " + CHR(34) + "[b=0][bg=RGB(248,248,248)]")
			oItems:SetProperty("CellHasCheckBox",h0,4,.T.)
			oItems:SetProperty("CellHasButton",h0,9,.T.)
			oItems:SetProperty("CellHAlignment",h0,9,1/*CenterAlignment*/)
			oItems:SetProperty("CellVAlignment",h0,8,0/*exTop*/)
			oItems:SetProperty("CellForeColor",h0,8,AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
			oItems:SetProperty("CellHasButton",h0,6,.T.)
			oItems:SetProperty("CellValue",h0,6,"<img>1</img>")
			oItems:SetProperty("CellValueFormat",h0,6,1/*exHTML*/)
			oItems:SetProperty("CellHAlignment",h0,6,1/*CenterAlignment*/)
			oItems:SetProperty("ItemHeight",h0,296)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1206
How can I arrange the columns on multiple levels

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 48
		oColumns := oG2antt:Columns()
			oColumns:Add("Title"):Visible := .F.
			oColumns:Add("FirstName"):Visible := .F.
			oColumns:Add("LastName"):Visible := .F.
			oColumns:Add("Photo"):Visible := .F.
			oColumn := oColumns:Add("Address")
				oColumn:Visible := .F.
				oColumn:SetProperty("Def",16/*exCellSingleLine*/,.F.)
			oColumn1 := oColumns:Add("Personal Info")
				oColumn1:FormatLevel := "3:48,(0/1/2),4:96"
				oColumn1:SetProperty("Def",32/*exCellFormatLevel*/,"3:48,(0/1/2),4:96")
		oG2antt:Chart():FirstVisibleDate := "01/01/2010"
		oG2antt:Chart():Bars:Item("Task"):OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Sales Representative")
			oItems:SetProperty("CellValue",h,1,"Nancy")
			oItems:SetProperty("CellValue",h,2,"Davolio")
			oItems:SetProperty("CellPicture",h,3,oG2antt:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)"))
			oItems:SetProperty("CellValue",h,4,"507-20th Ave. E.Apt.  2A")
			oItems:AddBar(h,"Task","01/01/2010","01/05/2010",2,2)
			oItems:AddBar(h,"Task","01/04/2010","01/08/2010",1,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1205
Is it possible to display a bar only using a gradient color using the exBarColor option

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/31/2009"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,96)
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
				oBar:SetProperty("EndColor",oBar:StartColor())
				oBar:Height := 17
		oG2antt:Columns():Add("Types")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Original"),"Task","01/04/2010","01/09/2010","")
			h := oItems:AddItem("W/h Gradient")
			oItems:AddBar(h,"Task","01/04/2010","01/09/2010","")
			oItems:SetProperty("ItemBar",h,"",42/*exBarPattern*/,227)
			h := oItems:AddItem("W/h Color")
			oItems:AddBar(h,"Task","01/04/2010","01/09/2010","")
			oItems:SetProperty("ItemBar",h,"",42/*exBarPattern*/,227)
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,255)
			oItems:AddBar(oItems:AddItem("Original"),"Task","01/04/2010","01/09/2010","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1204
Is it possible to display a bar only using a gradient color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/31/2009"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,96)
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
				oBar:SetProperty("EndColor",oBar:StartColor())
				oBar:Height := 17
		oG2antt:Columns():Add("Types")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Original"),"Task","01/04/2010","01/09/2010","")
			h := oItems:AddItem("W/h Gradient")
			oItems:AddBar(h,"Task","01/04/2010","01/09/2010","")
			oItems:SetProperty("ItemBar",h,"",42/*exBarPattern*/,227)
			oItems:AddBar(oItems:AddItem("Original"),"Task","01/04/2010","01/09/2010","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1203
Is it possible to display a bar only using a gradient color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/31/2009"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,96)
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
				oBar:SetProperty("EndColor",oBar:Color())
		oG2antt:Columns():Add("Types")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Original"),"Task","01/04/2010","01/09/2010","")
			h := oItems:AddItem("W/h Gradient")
			oItems:AddBar(h,"Task","01/04/2010","01/09/2010","")
			oItems:SetProperty("ItemBar",h,"",42/*exBarPattern*/,99)
			oItems:AddBar(oItems:AddItem("Original"),"Task","01/04/2010","01/09/2010","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1202
How can I display a specified bar only with a thicker border

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/31/2009"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,96)
		oG2antt:Columns():Add("Types")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Original"),"Task","01/04/2010","01/09/2010","")
			h := oItems:AddItem("W/h Border")
			oItems:AddBar(h,"Task","01/04/2010","01/09/2010","")
			oItems:SetProperty("ItemBar",h,"",42/*exBarPattern*/,4099)
			oItems:AddBar(oItems:AddItem("Original"),"Task","01/04/2010","01/09/2010","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1201
Is it possible to display the shadow for a specified bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/31/2009"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,96)
		oG2antt:Columns():Add("Types")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Original"),"Task","01/04/2010","01/09/2010","")
			h := oItems:AddItem("W/h Shadow")
			oItems:AddBar(h,"Task","01/04/2010","01/09/2010","")
			oItems:SetProperty("ItemBar",h,"",42/*exBarPattern*/,8195)
			oItems:AddBar(oItems:AddItem("Original"),"Task","01/04/2010","01/09/2010","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN